package com.testfileupload.uploadimg.design.state.define;

public class Context {
    public static final ConcreateState1 constate1= new ConcreateState1();
    public static final ConcreateState2 constate2 = new ConcreateState2();

    //当前状态
    private State state;

    public State getState() {
        return state;
    }

    public void setState(State state) {
        this.state = state;
        this.state.setContext(this);
    }
    public void handle1(){
        this.state.handle1();
    }
    public void handle2(){
        this.state.handle2();
    }
}
